package cn.itsource.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.List;

@Data
@Document(collection = "t_Employee")
public class Role {
    @Id
    private String _id;
    private Long id;
    private String name;
    private String sn;
    //封装当前角色的所有权限和菜单-用于前端分页列表显示权限和菜单的名称
    List<String> permissions = new ArrayList<>();
    List<String> menus = new ArrayList<>();

    //封装当前角色的所有权限和菜单的id-用于修改时回显当前角色的权限和菜单
    //前端点击添加和修改将ID值进行接收，然后传递到后端用于操作数据库
    List<Long> mymenus = new ArrayList<>();
    List<Long> mypermissions = new ArrayList<>();
}
